import django_filters
from .models import *

class ComponentFilter(django_filters.rest_framework.FilterSet):
    """过滤器"""

    title = django_filters.CharFilter(lookup_expr='icontains')
    name = django_filters.CharFilter(lookup_expr='icontains')
    
    class Meta:
        model = Component
        fields = '__all__'